#pragma once
#include <imgui.h>
#include <utl/vector.h>
#include <string>

namespace primary
{
	class GuiWindowBase
	{
	public:
		GuiWindowBase(const std::string& tit);
		void render();
		bool* muti_is_show();
	private:
		virtual void content() = 0;
	private:
		std::string title;
		bool is_show;
	};

	class GuiBase
	{
	public:
		GuiBase();
		virtual ~GuiBase();
		void bind();
		void render();
		void push_window(GuiWindowBase*);
		void pop_window(GuiWindowBase*);
	private:
		virtual void new_frame() = 0;
		virtual void draw() = 0;
	private:
		ImGuiContext* context;
		utl::vector<GuiWindowBase*> windows;
	};
}